/**
 * easyui同步树:全部加载方案
 * @param treeid
 * @param id
 * @param bitsXmlId
 * @param animate
 * @param checkbox
 * @param onlyLeafCheck
 * @param lines
 * @param onBeforeSelect
 */
function treesync(treeid,id,bitsXmlId,servicename,animate,checkbox,onlyLeafCheck,lines,onBeforeSelect,queryParams){
	if(queryParams!=null){
		$('#'+treeid).tree({
	    	url: '/tree/alltreeload',
	    	queryParams :queryParams,
	    	method:'post',
	    	lines:lines,
	    	animate:animate,
	    	checkbox:checkbox,
	    	onlyLeafCheck:onlyLeafCheck,
	    	onBeforeSelect:onBeforeSelect
	    }); 	
	}else{
		$('#'+treeid).tree({
	    	url: '/tree/alltreeload',
	    	queryParams :{
	    		id : id,
	    		servicename : servicename,
	    		bitsXmlId : bitsXmlId,
	    		state : 'open'
	    	},
	    	method:'post',
	    	lines:lines,
	    	animate:animate,
	    	checkbox:checkbox,
	    	onlyLeafCheck:onlyLeafCheck,
	    	onBeforeSelect:onBeforeSelect
	    }); 
	}
	
}

/**
 * easyui异步树:异步加载方案
 * @param treeid
 * @param id
 * @param bitsXmlId1
 * @param bitsXmlId2
 * @param animate
 * @param checkbox
 * @param onlyLeafCheck
 * @param lines
 * @param onBeforeSelect
 */
function treeasync(treeid,id,bitsXmlId1,bitsXmlId2,servicename,animate,checkbox,onlyLeafCheck,lines,onBeforeSelect,queryParams){
	if(queryParams!=null){
		$('#'+treeid).tree({
	    	url: '/tree/inittreeload',
	    	queryParams :queryParams,
	    	method:'post',
	    	lines:lines,
	    	animate:animate,
	    	checkbox:checkbox,
	    	onlyLeafCheck:onlyLeafCheck,
	    	onBeforeSelect:onBeforeSelect,    	
	    	onBeforeExpand:function(node){		               
				$('#MyTree1').tree('options').url = '/tree/nodetreeload?id='+ node.id+'&bitsXmlId='+bitsXmlId2;//+'&servicename='+servicename 错误自带,没时间查原因
			}
	    }); 
	}else{
		$('#'+treeid).tree({
	    	url: '/tree/inittreeload',
	    	queryParams :{
	    		id : id,
	    		servicename : servicename,
	    		bitsXmlId : bitsXmlId1	    		
	    	},
	    	method:'post',
	    	lines:lines,
	    	animate:animate,
	    	checkbox:checkbox,
	    	onlyLeafCheck:onlyLeafCheck,
	    	onBeforeSelect:onBeforeSelect,    	
	    	onBeforeExpand:function(node){		               
				$('#MyTree1').tree('options').url = '/tree/nodetreeload?id='+ node.id+'&bitsXmlId='+bitsXmlId2;//+'&servicename='+servicename 错误自带,没时间查原因
			}
	    }); 
	}
	
}